let doctor = require('../model/doctor')
let {
    Router
} = require("express");
let router = new Router();
let lists = require('../static/doctor.js')
Promise.all(lists().forEach(item => doctor.create(item))).then((res) => {
    console.log(res);
}).catch(error => console.log(error))

//查询所有医生
router.post('/alldoctor', async (req, res) => {
    let datas = await doctor.find();
    res.status(200).json({
        msg: '查询成功',
        datas
    })
})


module.exports = router;